{extend name="ashippingguide/Public/base" /}
{block name="container"}
<script src="__STATIC__/layout/js/plugins/layer/laydate/laydate.js"></script>
<!-- 标题 -->
<div class="page-heade clearfix">
    <h2 class="title_color text-center">
        <a class="col-md-4 title_color H_right" style="font-size: 16px;" href="{:url('ashippingguide/queryentry')}">所属导购入职查询</a>
        <a class="col-md-4 title_color H_right" style="font-size: 16px;color:#333;" href="{:url('ashippingguide/queryaccident')}">所属导购异动查询</a>
        <a class="col-md-4 title_color H_right H_active" style="font-size: 16px;color:#333;" href="{:url('ashippingguide/queryquit')}">所属导购离职查询</a>
    </h2>
</div>
<!-- 标题 -->
<div>
    <form action="" class="form-inline" id="form1" method="post">
        <table class="row-margin-top tab-content table-bordered table" border="1">
            <tr>
                <td class="text-right">编号</td>
                <td><input type="text" class="form-control" name="a.no" id="no" value="<?php if(isset($where['a_no'])) echo $where['a_no']; ?>"></td>
                <td class="text-right">主题</td>
                <td><input type="text" class="form-control" name="a.theme" id="theme" value="<?php if(isset($where['a_theme'])) echo $where['a_theme']; ?>"></td>
                <td class="text-right">分区名称</td>
                <td><input type="text" class="form-control" name="p.title" id="yq" value="<?php if(isset($where['p_title'])) echo $where['p_title']; ?>"></td>
            </tr>
            <tr>
                <td class="text-right">省份名称</td>
                <td><input type="text" class="form-control" name="n.title" id="ys" value="<?php if(isset($where['n_title'])) echo $where['n_title']; ?>"></td>
                <td class="text-right">城市名称</td>
                <td><input type="text" class="form-control" name="o.title" id="yshi" value="<?php if(isset($where['o_title'])) echo $where['o_title']; ?>"></td>
                <td class="text-right">系统名称</td>
                <td><input type="text" class="form-control" name="e.title" id="xt" value="<?php if(isset($where['e_title'])) echo $where['e_title']; ?>"></td>
            </tr>
            <tr>
                <td class="text-right">网点名称</td>
                <td><input type="text" class="form-control" name="c.title" id="wd" value="<?php if(isset($where['c_title'])) echo $where['c_title']; ?>"></td>
                <td class="text-right">申请人</td>
                <td><input type="text" class="form-control" name="b.applicant" id="applicant" value="<?php if(isset($where['b_applicant'])) echo $where['b_applicant']; ?>"></td>
                <td class="text-right">离职生效日期</td>
                <td>
                    <input type="text" class="form-control layer-date" id="start" name="quitDate" value="<?php if(isset($where['quitDate'])) echo $where['quitDate']; ?>">至
                    <input type="text" class="form-control layer-date" id="end" name="end" value="<?php if(isset($where['end'])) echo $where['end']; ?>">
                </td>
            </tr>
            <tr>
                <td class="text-right">状态</td>
                <td>
                    <select name="a.state" id="state" class="form-control select">
                        <option value="">请选择</option>
                        <option value="草稿">草稿</option>
                        <option value="已更改">已更改</option>
                    </select>
                    <script>
                        $('#state').val("<?php if(isset($where['a_state'])) echo $where['a_state']; ?>");
                    </script>
                </td>
                <td class="text-right">导购员</td>
                <td colspan="3">
                    <input type="text" class="form-control" name="b.name" id="name" value="<?php if(isset($where['b_name'])) echo $where['b_name']; ?>">
                </td>
            </tr>
            <tr>
                <td colspan="6" class="text-center">
                    <button class="btn-sm btn-info btn" type="submit">查询</button><span class="lr_5"></span><button class="btn-sm btn-info btn" type="reset" id="reset">清空查询条件</button>  <span class="lr_5"></span><button class="btn btn-info btn-sm" type="button" onclick='window.open("/index/ashippingguide/exportquit","_self")'>导出Excel</button>
                </td>
            </tr>
        </table>
    <table class="table table-striped table-bordered table-hover bud_hei text-center">
        <tr class="info">
            <td>NO.</td>
            <td>编号</td>
            <td>主题</td>
            <td>状态</td>
            <td>分区名称</td>
            <td>省份名称</td>
            <td>城市名称</td>
            <td>系统名称</td>
            <td>网点名称</td>
            <td>导购姓名</td>
            <td>离职生效日期</td>
            <td>申请人</td>
            <td>操作</td>
        </tr>
        {volist name="data" id="list"}
        <tr>
            <td>{$i}</td>
            <td><a href="{:url('ashippingguide/guideInfo')}?id={$list.user_id});">
                <!--href="{:url('Other/ruzhidetail')}"-->
                {$list.no}</a></td>
            <td class="text-left"><span class="font-bold">{$list.theme}</span>{if condition="$list['state'] == '已更改'"}<span class="glyphicon glyphicon-ok duigou" title="已生效" aria-hidden="true"></span>{/if}</td>
            <td>{$list.state}</td>
            <td>{$list.yq}</td>
            <td>{$list.ys}</td>
            <td>{$list.yshi}</td>
            <td>{$list.xt}</td>
            <td>{$list.wd}</td>
            <td>{$list.name}</td>
            <td>{$list.quitDate}</td>
            <td><a href="javascript:alert({$list.user_id});">{$list.applicant}</a></td>
            <td><a href="javascript:;">查看流程图</a></td>
        </tr>
        {/volist}
    </table>
    <h5 class="text-center" style="font-size: 13px;font-weight: 500">
        总共有{$count}条记录，第{$page}/{$maxpage}页,当前页<input id="page" name="pages" type="text" style="width: 40px" value="1"/>
        <button id="gopage">Go</button>&nbsp;&nbsp;<button
            id="fistpage" onclick="$('#form1').find('input').val('');">首页</button>&nbsp;&nbsp;
        每页显示
        <select id="pagesize" name="limts">
            <option value='10' selected>10条</option>
            <option value='15'>15条</option>
            <option value='20'>20条</option>
        </select>
        <script>
            $('#pagesize').val("{$limit}");
        </script>
    </h5>
    </form>
    <!-- <h3 class="text-center"><img src="__STATIC__/layout/img/zwsj.png"></h3> -->
</div>
<script>
    $(document).ready(function () {
        $('#reset').on('click',function () {
            $("#form1 input").each(function(){
                $(this).val('');
            });
            $("#form1 select").each(function(){
                $(this).val('');
            });
            $('#form1').submit()
            return false
        })
    })

    //日期范围限制
    var start = {
        elem: '#start',
        format: 'YYYY/MM/DD',
        min: '1970-01-01 00:00:00',//设定最小日期为当前日期
        max: '2099-06-16 23:59:59', //最大日期
        istime: true,
        istoday: false,
        choose: function (datas) {
            end.min = datas; //开始日选好后，重置结束日的最小日期
            end.start = datas //将结束日的初始值设定为开始日
        }
    };
    var end = {
        elem: '#end',
        format: 'YYYY/MM/DD',
        min: '1970-01-01 00:00:00',
        max: '2099-06-16 23:59:59',
        istime: true,
        istoday: false,
        choose: function (datas) {
            start.max = datas; //结束日选好后，重置开始日的最大日期
        }
    };
    laydate(start);
    laydate(end);
</script>
{/block}
